-- Pull in the wezterm API
local wezterm = require 'wezterm'

-- This will hold the configuration.
local config = wezterm.config_builder()

-- This is where you actually apply your config choices

-- For example, changing the color scheme:
config.color_scheme = 'tokyonight-storm'


config.font = wezterm.font_with_fallback {
  'JetBrainsMono NFP',
  'Microsoft YaHei',
}

config.font_size = 9.5

config.bold_brightens_ansi_colors = "BrightAndBold"

config.font_rules = {
  {
    intensity = 'Bold',
    italic = false,
    font = wezterm.font {
      family = 'JetBrainsMono NFP',
      weight = 'Bold',
      style = 'Normal',
    }
  }
}

config.hide_tab_bar_if_only_one_tab = false

config.window_frame = {
  -- The font used in the tab bar.
  -- Roboto Bold is the default; this font is bundled
  -- with wezterm.
  -- Whatever font is selected here, it will have the
  -- main font setting appended to it to pick up any
  -- fallback fonts you may have used there.
  font = wezterm.font { family = 'JetBrainsMono NFP' },

  -- The size of the font in the tab bar.
  -- Default to 10.0 on Windows but 12.0 on other systems
  font_size = 9.5,

  -- The overall background color of the tab bar when
  -- the window is focused
  active_titlebar_bg = '#1b1d2b',

  -- The overall background color of the tab bar when
  -- the window is not focused
  inactive_titlebar_bg = '#1b1d2b',
}


config.colors = {
  tab_bar = {
    -- The color of the strip that goes along the top of the window
    -- (does not apply when fancy tab bar is in use)
    background = '#1b1d2b',

    -- The active tab is the one that has focus in the window
    active_tab = {
      -- The color of the background area for the tab
      bg_color = '#222436',
      -- The color of the text for the tab
      fg_color = '#c8d3f5',

      -- Specify whether you want "Half", "Normal" or "Bold" intensity for the
      -- label shown for this tab.
      -- The default is "Normal"
      intensity = 'Normal',

      -- Specify whether you want "None", "Single" or "Double" underline for
      -- label shown for this tab.
      -- The default is "None"
      underline = 'None',

      -- Specify whether you want the text to be italic (true) or not (false)
      -- for this tab.  The default is false.
      italic = false,

      -- Specify whether you want the text to be rendered with strikethrough (true)
      -- or not for this tab.  The default is false.
      strikethrough = false,
    },

    -- Inactive tabs are the tabs that do not have focus
    inactive_tab = {
      bg_color = '#1b1d2b',
      fg_color = '#3b4261',

      -- The same options that were listed under the `active_tab` section above
      -- can also be used for `inactive_tab`.
    },

    -- You can configure some alternate styling when the mouse pointer
    -- moves over inactive tabs
    inactive_tab_hover = {
      bg_color = '#222436',
      fg_color = '#c8d3f5',
      italic = false,

      -- The same options that were listed under the `active_tab` section above
      -- can also be used for `inactive_tab_hover`.
    },

    -- The new tab button that let you create new tabs
    new_tab = {
      bg_color = '#1b1d2b',
      fg_color = '#3b4261',

      -- The same options that were listed under the `active_tab` section above
      -- can also be used for `new_tab`.
    },

    -- You can configure some alternate styling when the mouse pointer
    -- moves over the new tab button
    new_tab_hover = {
      bg_color = '#222436',
      fg_color = '#c8d3f5',
      italic = false,

      -- The same options that were listed under the `active_tab` section above
      -- can also be used for `new_tab_hover`.
    },

	inactive_tab_edge = '#ff757f',
  },
}


config.window_padding = {
  left   = 5,
  right  = 0,
  top    = 5,
  bottom = 0,
}

config.use_fancy_tab_bar = false

config.window_frame = {
    border_left_width    = '0px',
    border_right_width   = '0px',
    border_bottom_height = '0px',
    border_top_height    = '5px',
    border_left_color    = '#222436',
    border_right_color   = '#222436',
    border_bottom_color  = '#222436',
    border_top_color     = '#1b1d2b',
}





-- and finally, return the configuration to wezterm
return config
